<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body{
            margin: 0;
        }

        .c1{
            background-color: red;
            position: absolute;
            left: 50px;
            top:50px;
            width: 200px;
            height: 200px;
        }
        .c2{
            background-color: green;
            position: absolute;
            left:100px;
            top:100px;
            width: 200px;
            height: 200px;
            }
        #box{
            position: relative;
            width: 500px;
            height: 500px;
            /* margin: 0 auto; */
            top: 200px;
            left: 300px;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div id="box">
            <div class="c1"></div>
            <div class="c2"></div>
    </div>
  
</body>
</html>